<template>
  <PageWrapper title="测试组件和新功能专用">
    <ClickOutSide @click-outside="handleClickOutside" class="flex justify-center">
      <div @click="innerClick" class="demo-box">
        {{ text }}
      </div>
    </ClickOutSide>
  </PageWrapper>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import { ClickOutSide } from '/@/vbenComponents/ClickOutSide'
import { PageWrapper } from '/@/vbenComponents/Page'

export default defineComponent({
  components: { ClickOutSide, PageWrapper },
  setup() {
    const text = ref('Click')
    function handleClickOutside() {
      text.value = 'Click Out Side'
    }

    function innerClick() {
      text.value = 'Click Inner'
    }
    return { innerClick, handleClickOutside, text }
  },
})
</script>

<style lang="less" scoped>
.demo-box {
  display: flex;
  width: 100%;
  height: 300px;
  font-size: 24px;
  color: #fff;
  background-color: #408ede;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
}
</style>
